package com.tensquare.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tensquare.entity.Result;
import com.tensquare.user.exception.UserInvalidException;
import com.tensquare.user.exception.UserRegisteredException;
import com.tensquare.user.pojo.TbUser;
import com.tensquare.user.vo.UserInfoResponse;
import com.tensquare.user.vo.UserVO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 用户(TbUser)表服务接口
 *
 * @author long
 * @since 2021-07-16 17:00:07
 */
public interface TbUserService {

    UserInfoResponse findById(String id);

    void register(TbUser user) throws UserRegisteredException;

    Map<String, Object> login(Map<String, String> map) throws UserInvalidException;

    void logout(String tokenId) throws Exception;

    UserVO findByPage(int offset, int limit, Map<String,Object> columnsData, Date beginCreateDate, Date endCreateDate);

    List<UserInfoResponse> findList(String ids);

    void updateUser(TbUser tbUser);

    Result delUser(String ids);

    void restPassword(String id);

    String isLogin(String userId);

}
